package cn.cttic.order.api.domain.bo;

import cn.cttic.order.api.domain.BaseReconciliation;
import cn.cttic.common.mybatis.core.domain.BaseEntity;
import cn.cttic.common.core.validate.AddGroup;
import cn.cttic.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 对账管理业务对象 base_reconciliation
 *
 * @author Times.Studio
 * @date 2025-01-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BaseReconciliation.class, reverseConvertGenerate = false)
public class BaseReconciliationBo extends BaseEntity {

    /**
     *
     */
    @NotBlank(message = "不能为空", groups = { EditGroup.class })
    private String id;

    /**
     * 服务单位
     */
    @NotBlank(message = "服务单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String companyId;

    /**
     * 服务开始日期
     */
    @NotBlank(message = "服务开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDateTime periodBeginDate;

    /**
     * 服务结束日期
     */
    @NotNull(message = "服务结束日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDateTime periodEndDate;

    /**
     * 服务类型
     */
    @NotBlank(message = "服务类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderType;

    /**
     * 服务数量
     */
    @NotBlank(message = "服务数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer orderCount;

    /**
     * 服务状态
     */
    @NotNull(message = "服务状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer reconciliationStatus;

    /**
     * 核销意见
     */
    @NotBlank(message = "核销意见不能为空", groups = { AddGroup.class, EditGroup.class })
    private String reconciliationReason;

    /**
     * 开始核销
     */
    @NotNull(message = "开始核销不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer startingWriteOff;

    /**
     * 核销状态
     */
    @NotNull(message = "核销状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer writeOffStatus;

    /**
     * 核销意见
     */
    @NotBlank(message = "核销意见不能为空", groups = { AddGroup.class, EditGroup.class })
    private String writeOffReason;

    /**
     * 核销审批单号
     */
    @NotBlank(message = "核销审批单号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String writeOffApprovalNo;

    /**
     * 核销凭证
     */
    @NotBlank(message = "核销凭证不能为空", groups = { AddGroup.class, EditGroup.class })
    private String writeOffProof;

    /**
     * 是否开票
     */
    @NotBlank(message = "是否开票不能为空", groups = { AddGroup.class, EditGroup.class })
    private String hasReceipt;

    /**
     * 服务发票
     */
    @NotBlank(message = "服务发票不能为空", groups = { AddGroup.class, EditGroup.class })
    private String receiptInfo;

    /**
     * 支付凭证
     */
    @NotBlank(message = "支付凭证不能为空", groups = { AddGroup.class, EditGroup.class })
    private String paidProof;


}
